home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / refex / ex41.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  443 b   |  18 lines

  1. Program Example41;
  2.  
  3. { Program to demonstrate the MemAvail function. }
  4.  
  5. Var  
  6.   P, PP : Pointer;
  7.  
  8. begin
  9.   GetMem (P,100);
  10.   GetMem (PP,10000);
  11.   FreeMem (P,100);
  12.   { Due to the heap fragmentation introduced
  13.     By the previous calls, the maximum amount of memory
  14.     isn't equal to the maximum block size available. } 
  15.   Writeln ('Total heap available    (Bytes) : ',MemAvail);
  16.   Writeln ('Largest block available (Bytes) : ',MaxAvail);  
  17. end.
  18.